﻿@{
    ViewBag.Title = "DeskAdd";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="main-container">
    <div class="modal-form">
        <div class="modal-form-body">
            <form id="Form" method="post" class="form-horizontal margin10-t">
                <div class="contrl">
                    <label>餐桌号：</label>
                    <input type="text" name="DeskNumber" class="input">
                </div>
                <div class="contrl">
                    <label>备注说明：</label>
                    <textarea name="Remark" class="input-big" rows="4"></textarea>
                </div>
            </form>
        </div>
        <div class="modal-form-footer">
            <input type="button" class="btn-primary" value="保存" onclick="autoSubmit('System', 'DeskAdd', 'DeskList')" />
            <input type="button" class="btn-secondary" value="取消" onclick="CloseModelFrame()">
        </div>
    </div>
</div>
<script type="text/javascript">
    //验证字段
    $(document).ready(function () {
        $("#Form").validate({
            rules: {
                DeskNumber: { required: true, maxlength: 50 },
                Remark: { maxlength: 300 }
            },
            messages: {
                DeskNumber: {
                    required: "请输入餐桌号",
                    maxlength: "餐桌号长度最多50字"
                },
                Remark: {
                    maxlength: "长度最多300字"
                }
            },
            errorElement: "em"
        });
    });
</script>
